<template>
	<view class="container">
		<view class="content">
			<view class="listContainer" v-for="item in dataList" @click="to">
				<view class="list">
					<u-icon name="map" color="#5c77ff" size="35"></u-icon>
					<view class="title">设备地点：</view>
					<view>{{item.site}}</view>
				</view>
				<view class="list">
					<u-icon name="order" color="#5c77ff" size="35"></u-icon>
					<view class="title">设备序号：</view>
					<view>{{item.deviceSign}}</view>
				</view><view class="list">
					<u-icon name="account" color="#5c77ff" size="35"></u-icon>
					<view class="title">登录账号：</view>
					<view>{{item.loginName}}</view>
				</view><view class="list">
					<u-icon name="eye" color="#5c77ff" size="35"></u-icon>
					<view class="title">登录密码：</view>
					<view>{{item.loginPass}}</view>
				</view>
				<view class="arrow-right">
					<u-icon name="arrow-right" color="#bcc0c8" size="35"></u-icon>
				</view>
			</view>
		</view>
		<!-- <u-button @click='to'>查看视频</u-button> -->
	</view>

</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				dataList: [],
			}
		},
		onLoad() {
			this.getVideoList()
		},
		mounted() {
		},
		methods: {
			getVideoList() {
				uni.showLoading({
					title: '加载中'
				});
				this.$ajax({
					url: '/wx/device',
					method: 'GET',
					success: res => {
						this.dataList = res.data.data.list
					},
					complete: res =>{
						uni.hideLoading();
					}
				})
			},
			to() {
				wx.navigateToMiniProgram({
					appId: 'wx0802ecd34e125641',
					path: '/pages/home/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		padding: 10px 10px 0 10px;
		@include flex_layout_column;
		min-height: 100vh;
		.content{
			
			.listContainer{
				background-color: #fff;
				border-bottom: 2px solid #EFEFEF;
				position: relative;
				padding: 10px 10px 10px 10px;
				.list{
					height: 30px;
					align-items: center;
					display: flex;
					/deep/ .u-icon{
						margin-right: 10px;
					}
					>view:nth-of-type(1){
						font-size: 14px;
						font-weight: bold;
					}
				}
				.arrow-right{
					position: absolute;
					right: 0;
					top:50%
				}
				
			}
		}
	}
</style>
